import dayjs from "dayjs";
export const timeProcessing = (time, type = "dateTime") => {
  if (type === "dateTime") return dayjs(time).format("YYYY-MM-DD HH:mm:ss");
  if (type === "date") return dayjs(time).format("YYYY-MM-DD");
  if (type === "time") return dayjs(time).format("HH:mm:ss");
};

export const toTime = (time, type = "hours") => {
  if (type === "hours") return dayjs(time).hour();
  if (type === "date") return dayjs(time).date();
};
